//
//  CSBPauijCell.swift
//  CurSodoboAer
//
//  Created by CurSodoboAer on 2024/11/7.
//

import UIKit

class CSBPauijCell: UICollectionViewCell {
    let topCountrCSBbg = UILabel.init()
    let bottomgMOneyCSBbg = UILabel.init()
    
    private var cakeCSB:Dictionary<String,CGPoint>?
    private var fookCSB: UITextField?

    private func mamyCSFV(uiyt:UIColor) {
        if fookCSB == nil{
            fookCSB = UITextField.init()
            fookCSB?.backgroundColor = uiyt
            fookCSB?.leftViewMode = .never
            fookCSB?.placeholder = nil
        }
        
        
        if cakeCSB == nil{
            cakeCSB = Dictionary.init()
        }
        
        var poinrtCSB = CGPoint.init(x: 23, y: 34)
        
        cakeCSB?["\(CGFloat.random(in: 0...5))"] = poinrtCSB
        
        if fookCSB?.text == nil {
            cakeCSB?["\(CGFloat.random(in: 5...20))"] = poinrtCSB
        }
        poinrtCSB.y += 10
        
        if cakeCSB?.keys.count ?? 0 > 0 {
            
        }
        
        if poinrtCSB.y > 2 && poinrtCSB.x > 2 {
            
        }
        
    }
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        let coingddd = UIImageView(image: UIImage.init(named: "blacnceCoun_csb"))
        
        self.layer.cornerRadius = 20
        self.layer.masksToBounds = true
       
        
        self.backgroundColor = UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1)
        
        bottomgMOneyCSBbg.backgroundColor =  UIColor(red: 0.75, green: 0.99, blue: 0.01, alpha: 1)
        bottomgMOneyCSBbg.textColor =  UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1)
        bottomgMOneyCSBbg.font =  UIFont(name: "Helvetica Bold", size: 14)
        bottomgMOneyCSBbg.textAlignment = .center
        bottomgMOneyCSBbg.layer.cornerRadius = 20
        bottomgMOneyCSBbg.layer.masksToBounds = true
        topCountrCSBbg.sizeToFit()
        topCountrCSBbg.textAlignment = .center
        topCountrCSBbg.textColor = .white
        topCountrCSBbg.font = UIFont(name: "Futura Bold", size: 17.xQQ)
        contentView.addSubview(coingddd)
        contentView.addSubview(topCountrCSBbg)
        contentView.addSubview(bottomgMOneyCSBbg)
        
        coingddd.snp.makeConstraints { make in
            make.width.height.equalTo(32.xQQ)
            make.top.equalToSuperview().offset(12.xQQ)
            make.leading.equalToSuperview().offset(8.xQQ)
        }
        
        topCountrCSBbg.snp.makeConstraints { make in
            make.centerY.equalTo(coingddd)
            make.left.equalTo(coingddd.snp.right)
            make.right.equalToSuperview()
        }
        
        bottomgMOneyCSBbg.snp.makeConstraints { make in
            make.left.right.bottom.equalToSuperview()
            make.top.equalTo(coingddd.snp.bottom).offset(12.xQQ)
        }
    }
    
    override var isSelected: Bool{
        didSet{
            if isSelected {
                layer.borderColor = UIColor(red: 0.75, green: 0.99, blue: 0.01, alpha: 1).cgColor
                layer.borderWidth = 3
            }else{
                layer.borderColor = UIColor.clear.cgColor
                layer.borderWidth = 0
            }
        }
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
